package com.sunyu.springboot.controller;

import com.power.common.model.CommonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yu 2018/9/3.
 */
@RestController
public class LongProcessController {

    /**
     * long-process
     * @return
     * @throws InterruptedException
     */
    @RequestMapping("/long-process")
    public CommonResult<String> pause() throws InterruptedException {
        Thread.sleep(15000);
        return CommonResult.ok().setResult("Process finished");
    }
}
